﻿#pragma once


#include <string>

namespace Base {

#define D_ASSERT(flag,msg) Debug::Assert(__FILE__,__LINE__,(flag),msg);
#define D_HRESULT(h) if(FAILED(h)){Debug::CheckLastError();}

	class Debug
	{

	public:

		static void Assert(const char* file, int line, bool flag, const std::string& msg);

		static void ThrowOrMessageBox(const std::string& msg);

		static void CheckLastError();
	};

	// 一些全局的帮助函数
	std::string& Trim(std::string &s);
}
